<template>
  <div class="pay-container">
    <header class="mui-bar mui-bar-nav" :style="back">
      <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
      <h1 class="mui-title">支付结果</h1>
    </header>
    <div class="pay-status" :style="back">
      <div class="success">
        <img src="@/assets/images/收藏2.png" alt="success" v-if="bgc">
        <img src="@/assets/images/收藏1.png" alt="success" v-else>
        <span v-if="bgc">支付成功</span>
        <span v-else>支付失败</span>
      </div>
      <div class="money">
        <span>￥</span>
        <span>1223355.00</span>
      </div>
    </div>
    <div class="pay-info">
      <div class="info">
        <div class="info-text">
          <div class="title">菜大师鲁巷店</div>
          <p class="num">订单编号: 123456789012345678</p>
          <p class="time">下单时间: 2018-12-25 15:23</p>
          <p class="count">采购数量: 12121件</p>
        </div>
        <div class="info-btn">
          <mt-button type="primary" plain v-if="bgc">查看订单</mt-button>
          <mt-button type="primary" plain v-else>返回首页</mt-button>
          <mt-button type="primary" plain v-if="bgc">回到首页</mt-button>
          <mt-button type="primary" v-else>继续支付</mt-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bgc:false,
      back:{}
    }
  },
  created(){
    if(this.bgc){
      this.back={backgroundColor:'#5fb8e0'}
    }else{
      this.back = {backgroundColor:'#808080'}
    }
  },
  methods: {

  }
}
</script>

<style lang="scss">
.pay-container {
  background-color: #f7f7f7;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  //font-family: "黑体", sans-serif;
  font-family: "微软雅黑", sans-serif;
  .pay-status {
    height: 250px;
    background-color: #5fb8e0;
    text-align: center;
    margin-top: 44px;
    padding-top: 20px;
    color: #fff;
    font-family: "微软雅黑", sans-serif;
    .success {
      img {
        width: 30px;
        position: relative;
        top: 4px;
      }
      span {
        font-size: 22px;
        margin-left: 3px;
      }
    }
    .money {
      margin-top: 40px;
      span {
        font-weight: bold;
      }
      span:last-child {
        font-size: 26px;
      }
    }
  }
  .pay-info {
    width: 100%;
    padding: 0 20px;
    height: 300px;
    //   background-color: red;
    margin-top: -80px;
    .info {
      background-color: #fff;
      height: 100%;
      .info-text {
        padding: 20px 50px;
        .title {
          margin-bottom: 20px;
        }
        p {
          font-size: 13px;
          margin-bottom: 15px;
        }
      }
      .info-btn {
        text-align: center;
        margin-top: 35px;
        label {
          font-size: 16px;
        }
        .mint-button:first-child {
          margin-right: 35px;
        }
        .mint-button:last-child {
          margin-left: 35px;
        }
      }
    }
  }
}

.mui-bar {
  background-color: #5fb8e0;
}
.mui-bar-nav {
  box-shadow: none;
}
.mui-bar .mui-icon {
  color: #fff;
}
.mui-title {
  font-size: 18px;
  color: #fff;
}
</style>